﻿using dotHTML.HTML;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using System.Text;
#pragma warning disable 0618
namespace TestdotHTML
{
    
    
    /// <summary>
    ///This is a test class for AppletTest and is intended
    ///to contain all AppletTest Unit Tests
    ///</summary>
    [TestClass()]
    public class AppletTest {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext {
            get {
                return testContextInstance;
            }
            set {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion

        [TestMethod()]
        public void AppletConstructorTest() {
            Applet target = new Applet();
            Assert.AreEqual(target.ToString(), "<applet></applet>");
        }

        /// <summary>
        ///A test for Alignment
        ///</summary>
        [TestMethod()]
        public void AlignmentTest() {
            Applet target = new Applet(); 
            Nullable<Applet.AlignmentChoices> expected = Applet.AlignmentChoices.Bottom; 
            Nullable<Applet.AlignmentChoices> actual;
            target.Align = expected;
            actual = target.Align;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Alt
        ///</summary>
        [TestMethod()]
        public void AltTest() {
            Applet target = new Applet(); 
            string expected = string.Empty; 
            string actual;
            target.Alt = expected;
            actual = target.Alt;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Archive
        ///</summary>
        [TestMethod()]
        public void ArchiveTest() {
            Applet target = new Applet(); 
            string expected = string.Empty; 
            string actual;
            target.Archive = expected;
            actual = target.Archive;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Code
        ///</summary>
        [TestMethod()]
        public void CodeTest() {
            Applet target = new Applet(); 
            string expected = string.Empty; 
            string actual;
            target.Code = expected;
            actual = target.Code;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Codebase
        ///</summary>
        [TestMethod()]
        public void CodebaseTest() {
            Applet target = new Applet(); 
            string expected = string.Empty; 
            string actual;
            target.CodeBase = expected;
            actual = target.CodeBase;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for HSpace
        ///</summary>
        [TestMethod()]
        public void HSpaceTest() {
            Applet target = new Applet(); 
            Nullable<int> expected = 0; 
            Nullable<int> actual;
            target.HSpace = expected;
            actual = target.HSpace;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Height
        ///</summary>
        [TestMethod()]
        public void HeightTest() {
            Applet target = new Applet(); 
            Nullable<int> expected = 10; 
            Nullable<int> actual;
            target.Height = expected;
            actual = target.Height;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for MayScript
        ///</summary>
        [TestMethod()]
        public void MayScriptTest() {
            Applet target = new Applet(); 
            bool expected = false; 
            bool actual;
            target.MayScript = expected;
            actual = target.MayScript;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Name
        ///</summary>
        [TestMethod()]
        public void NameTest() {
            Applet target = new Applet(); 
            string expected = string.Empty; 
            string actual;
            target.Name = expected;
            actual = target.Name;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Object
        ///</summary>
        [TestMethod()]
        public void ObjectTest() {
            Applet target = new Applet(); 
            string expected = string.Empty; 
            string actual;
            target.Object = expected;
            actual = target.Object;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for VSpace
        ///</summary>
        [TestMethod()]
        public void VSpaceTest() {
            Applet target = new Applet(); 
            Nullable<int> expected = 0; 
            Nullable<int> actual;
            target.VSpace = expected;
            actual = target.VSpace;
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for Width
        ///</summary>
        [TestMethod()]
        public void WidthTest() {
            Applet target = new Applet(); 
            Nullable<int> expected = 10; 
            Nullable<int> actual;
            target.Width = expected;
            actual = target.Width;
            Assert.AreEqual(expected, actual);
        }

        [TestMethod()]
        public void ToStringTest() {
            Applet target = new Applet();
            target.Align = Applet.AlignmentChoices.Bottom;
            target.Alt = "alt";
            target.Archive = "archive";
            target.Code = "code";
            target.CodeBase = "codebase";
            target.Height = 10;
            target.HSpace = 1;
            target.MayScript = true;
            target.Object = "object";
            target.Name = "name";
            target.VSpace = 2;
            target.Width = 11;
            Assert.AreEqual("<applet align=\"bottom\" " +
                "alt=\"alt\" " +
                "archive=\"archive\" " +
                "code=\"code\" " +
                "codebase=\"codebase\" " +
                "height=\"10\" " +
                "hspace=\"1\" " +
                "mayscript=\"mayscript\" " +
                "name=\"name\" " +
                "object=\"object\" " +
                "vspace=\"2\" " +
                "width=\"11\"></applet>", target.ToString());
        }
    }
}
